package cards;

import game.LowerEquipPanel;

import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;

// I don't use interface because the effects of equipments will be similar to each other.
public abstract class Equipment extends Card {
	public Equipment(String s, int c, int n, String d) {
		super(s, c, n, d);
	}

	public Image image;
	// TODO remember to add a method for image initialization

	// true if the equipment is equipped
	protected boolean equipped;
	// true if the equip's special could be
	// triggered. If this is true, the
	// background of this equip will blink in a
	// special way
//	protected boolean highlighted;
	
	private LowerEquipPanel.EquipButton linkedButton;
	/**
	 * @param linkedButton the linkedButton to set
	 */
	public void setLinkedButton(LowerEquipPanel.EquipButton linkedButton) {
		this.linkedButton = linkedButton;
	}

	/**
	 * @return the linkedButton
	 */
	public LowerEquipPanel.EquipButton getLinkedButton() {
		return linkedButton;
	}
	
	public void setEquipped(boolean equipped) {
		this.equipped = equipped;
	}

	protected void highlight() {
//		setClickable(true);
//		highlighted = true;
	}

	// TODO equipments has a different way of showing themselves: when they are
	// equipped by a hero. And they needs to be highlighted when their special
	// can be triggered
	protected void showWhenEquipped() {

	}

	// this method to be extended by armor and weapon
	public void specialEffect() {
	}
	@Override
	public boolean instanceOf(String superClass) {
		if(superClass.equalsIgnoreCase("Equipment")){
			return true;
		}
		return false;
	}
}
